package org.roger.search.filter;

import org.apache.lucene.search.Filter;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.QueryWrapperFilter;

/**
 * 将查询Query转换成Filter
 * @param query 查询Query
 * @author luoweiyi
 */
public class QueryTransferFilter implements LuceneSearchFilter{
	
	private Query query;
	
	public QueryTransferFilter(Query query){
		this.query = query;
	}

	@Override
	public Filter searchFilter() {
		QueryWrapperFilter filter = new QueryWrapperFilter(query);
		return filter;
	}
}
